1. Technical Field
The present invention is directed to memory systems. More specifically, the present invention is directed to a system and method of squeezing slabs of memory empty.
2. Description of Related Art
Presently, memory fragmentation is one of the biggest problems facing modern memory management subsystems. Memory fragmentation occurs when system memory has a multiplicity of partially-used allocated blocks of space.
One of the methods that has been used to reduce memory fragmentation is to allocate memory space in slabs. A slab is an allocated space (e.g., a block of 16 contiguous pages) of memory that is dedicated to hold only fixed sized objects (i.e., one type of data). For example, slabs may be allocated to hold only inodes. An inode is a data structure that contains system information about a file with which it is associated. When inodes are held in a slab of memory, they are in one area of the memory instead of being scattered all around. This helps in reducing memory fragmentation.
Slab allocation is discussed in THE SLAB ALLOCATOR: AN OBJECT-CACHING KERNEL MEMORY ALLOCATOR by Jeff Bonwick of Sun Microsystems as well as in MAGAZINES AND VMEM: EXTENDING THE SLAB ALLOCATOR TO MANY CPUs AND ARBITRARY RESOURCES by Jeff Bonwick of Sun Microsystems and Jonathan Adams of California Institute of Technology. The disclosures of both references are herein incorporated by reference.
When the system is in need of a large section of memory space and none is available, the system may decide to de-allocate a slab. However, since a block of allocated memory space may not be de-allocated until empty, a need therefore exists for a system and method of squeezing slabs of memory empty in order to facilitate de-allocation.